const mongoose = require('mongoose');

const dbConnect = async () => {
    try {
        const connect = await mongoose.connect(process.env.CONNECT_STRINGS)
        console.log(`Database Connected : ${connect.connection.host},${connect.connection.port}`);
    } catch (err) {
        console.error(err);
        process.exit(1);
    }
}

module.exports = dbConnect;